package pl.bristleback.server.bristle.exceptions.handlers;

import org.jwebsocket.api.WebSocketConnector;
import org.jwebsocket.token.Token;

/**
 * Implementation of this interface are responsible for handling some specific exceptions, caused by user.
 * Situations when handlers can be used are described in {@link ActionExceptionType} enum.
 * <p/>
 * Created on: 2010-10-23 23:27:08 <br/>
 *
 * @author Wojciech Niemiec
 */
public interface ExceptionHandler {

  /**
   * Handles exception thrown by given connector while processing token.
   *
   * @param connector web socket connector
   * @param token     token
   */
  void handleException(WebSocketConnector connector, Token token);
}
